|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodel.Individual
public class Individual
Individual object which simulates each skiier's values and past experience
| Field Summary | |
|---|---|
java.util.ArrayList<java.lang.Double> |
decisionPercent
Lists of the past and current decision percent |
java.util.ArrayList<java.lang.Double> |
experience
Lists of the individual's past and current experience |
java.util.ArrayList<int[]> |
friends
Lists of all the current individual's friend |
int |
ID
Name of Individual |
int |
IQ
Individual's IQ level |
java.util.ArrayList<java.lang.Double> |
skill
Lists of the individual's past and current skill level |
java.util.ArrayList<boolean[]> |
success
Lists of individual's past success rate |
java.util.ArrayList<java.lang.Double> |
successpercent
Lists of the individual's success percent (sum(success)/num_of_iterations) |
java.util.ArrayList<java.lang.Double> |
weather
Lists of the past simulation's weather |
java.util.ArrayList<boolean[]> |
went
Lists of history if the individual went to the resort |
java.util.ArrayList<java.lang.Double> |
wentpercent
Lists of the individual's went percent (sum(went)/num_of_iterations) |
| Constructor Summary | |
|---|---|
Individual(int ID,
int numskiiers,
int numweeks,
double wmean,
double fmean,
double smean,
double dp,
double exp)
Constructor for Individual |
|
| Method Summary | |
|---|---|
boolean |
decision(int week,
State s)
Calculates the final decision of the individual |
double |
friendfactor(int week,
State s)
Calculates friend factor (how much friends effect their final decision) |
void |
run()
|
void |
setvalues(java.util.Random r,
int numskiiers,
int numweeks,
double wmean,
double fmean,
double smean,
double dp,
double exp)
Adds the parameter values to the respective lists |
boolean |
strategy(int week,
State s)
Calculates if the user decides to go with their IQ level |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int ID
public java.util.ArrayList<int[]> friends
public java.util.ArrayList<java.lang.Double> skill
public java.util.ArrayList<java.lang.Double> weather
public int IQ
public java.util.ArrayList<java.lang.Double> decisionPercent
public java.util.ArrayList<java.lang.Double> experience
public java.util.ArrayList<boolean[]> went
public java.util.ArrayList<boolean[]> success
public java.util.ArrayList<java.lang.Double> successpercent
public java.util.ArrayList<java.lang.Double> wentpercent
| Constructor Detail |
|---|
public Individual(int ID,
int numskiiers,
int numweeks,
double wmean,
double fmean,
double smean,
double dp,
double exp)
ID: - Name of Individualnumskiiers: - Number of skiiers currently on resortnumweeks: - Number of week of the simulationwmean: - average weather inputfmean: - average number of friendssmean: - average skillsdp: - Decision percent of the simulationexp: - Current individual's experience| Method Detail |
|---|
public void run()
run in interface java.lang.Runnable
public void setvalues(java.util.Random r,
int numskiiers,
int numweeks,
double wmean,
double fmean,
double smean,
double dp,
double exp)
r: - Random generatornumskiiers: - Number of skiiers currently on resortnumweeks: - Number of week of the simulationwmean: - average weather inputfmean: - average number of friendssmean: - average skillsdp: - Decision percent of the simulationexp: - Experience Percent of the individual
public boolean strategy(int week,
State s)
week: - Number of week the simulation is ons: - Current state which stores the field variables
public double friendfactor(int week,
State s)
week: - Number of week the simulation is ons: - Current state which stores the field variables
public boolean decision(int week,
State s)
week: - Number of week the simulation is ons: - Current state which stores the field variables
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||